package com.csd.action.team;

import com.csd.helper.ActionResult;
import com.csd.pojo.Team;
import com.csd.serviceImpl.TeamService;

public class TeamInfoShowAction {

	/**
	 * 
	 * Action：根据ID查看团队信息
	 * 
	 * @author csd
	 * @version 1.0
	 * 
	 * <br>
	 *          修订时间：2009-12-17 <br>
	 *          修改原因：创建文件 <br>
	 *          修改人：刘世彬
	 * 
	 * <br>
	 * 
	 */
	private String teamID;

	private Team team;

	private String projectID;
	
	private String returnpage;
	
	public String getReturnpage() {
		return returnpage;
	}

	public void setReturnpage(String returnpage) {
		this.returnpage = returnpage;
	}

	public String getProjectID() {
		return projectID;
	}

	public void setProjectID(String projectID) {
		this.projectID = projectID;
	}

	private TeamService service;

	public TeamService getService() {
		return service;
	}

	public String getTeamID() {
		return teamID;
	}

	public void setTeamID(String teamID) {
		this.teamID = teamID;
	}

	public void setService(TeamService service) {
		this.service = service;
	}

	public Team getTeam() {
		return team;
	}

	public void setTeam(Team team) {
		this.team = team;
	}

	public String execute() {
		String result = ActionResult.fail;

		this.team = service.getTeamByID(Integer.parseInt(teamID));

		if (this.team != null) {
			result = ActionResult.success;
		}
		
		return result;
	}

}
